package top.chendawei.aop.exceptions;

import top.chendawei.util.params.ResultMessage;

/**
 * 商城通用异常信息
 */
public class CommonPartsExceptions extends RuntimeException {

    /**
     * 缺货定义错误码
     */
    public static final int OOS_FAIL = 400;
    // 返回code
    private int code;
    private String message;

    public CommonPartsExceptions(String message) {
        super(message);
        this.code = ResultMessage.FAIL;
        this.message = message;
    }

    public CommonPartsExceptions(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
